import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    msg: "Hello Vuex",
    msg1: "Hello Vuex_1",
  },
  getters: {
    GET_MSG(state) {
      return state.msg;
    },
    GET_MSG_1(state) {
      return state.msg1;
    },
  },
  mutations: {
    SET_MSG(state, payload) {
      state.msg = payload;
    },
  },
  actions: {},
  modules: {
    // 模块化的时候会使用到
  },
});
